import { Entity } from "../../../../../Core/Module/Entity/Entity";
import { IAwake1 } from "../../../../../Core/Module/EventSystem/IAwakeSystem";
import { BsonIgnore, ImplementsInterface } from "../../../../../Decorator/Decorator";
import { UnitConfig, UnitConfigCategory } from "../../../Generate/Client/Config/UnitConfig";

@ImplementsInterface(IAwake1)
export class Unit extends Entity implements IAwake1<number> {

    private _ConfigId: number;
    public get ConfigId(): number {
        return this._ConfigId;
    }
    public set ConfigId(value: number) {
        this._ConfigId = value;
    }

    @BsonIgnore()
    public get Config(): UnitConfig {
        return UnitConfigCategory.Instance.Get(this.ConfigId);
    }

}